<?php

/**
 * PageProfile filter form base class.
 *
 * @package    faceshop
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BasePageProfileFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'current_api_id'           => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('CurrentApp'), 'add_empty' => true)),
      'previous_api_id'          => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('PreviousApp'), 'add_empty' => true)),
      'type'                     => new sfWidgetFormFilterInput(),
      'category'                 => new sfWidgetFormFilterInput(),
      'name'                     => new sfWidgetFormFilterInput(),
      'picture'                  => new sfWidgetFormFilterInput(),
      'link'                     => new sfWidgetFormFilterInput(),
      'likes_in_install'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'client_id'                => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'salesforce_id'            => new sfWidgetFormFilterInput(),
      'billing_email'            => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'invoice_link'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'apply_enabled'            => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'apply_method'             => new sfWidgetFormChoice(array('choices' => array('' => '', 'email' => 'email', 'url' => 'url'))),
      'apply_address'            => new sfWidgetFormFilterInput(),
      'culture'                  => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'job_slots'                => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'credit_amount'            => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'credit_currency'          => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'is_test'                  => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'is_places'                => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'smart_sort_threshold'     => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'smart_share_threshold'    => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'is_smart_sort_activated'  => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'is_smart_share_activated' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'show_ad'                  => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'show_recruiter_access'    => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'apply_iframe'             => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'top_banner_url'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'top_banner_map'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'bottom_banner_url'        => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'bottom_banner_map'        => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'job_logo_url'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'job_logo_map'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'custom_filters'           => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'location_filter'          => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'max_jobs_per_page'        => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'custom_tracking'          => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'xtsd'                     => new sfWidgetFormFilterInput(),
      'xtsite'                   => new sfWidgetFormFilterInput(),
      'xtn2'                     => new sfWidgetFormFilterInput(),
      'rt_valid'                 => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'rt_updated_at'            => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'fb_info_updated_at'       => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'fb_info_sync_error'       => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'created_at'               => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'updated_at'               => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
    ));

    $this->setValidators(array(
      'current_api_id'           => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('CurrentApp'), 'column' => 'api_id')),
      'previous_api_id'          => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('PreviousApp'), 'column' => 'api_id')),
      'type'                     => new sfValidatorPass(array('required' => false)),
      'category'                 => new sfValidatorPass(array('required' => false)),
      'name'                     => new sfValidatorPass(array('required' => false)),
      'picture'                  => new sfValidatorPass(array('required' => false)),
      'link'                     => new sfValidatorPass(array('required' => false)),
      'likes_in_install'         => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'client_id'                => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'salesforce_id'            => new sfValidatorPass(array('required' => false)),
      'billing_email'            => new sfValidatorPass(array('required' => false)),
      'invoice_link'             => new sfValidatorPass(array('required' => false)),
      'apply_enabled'            => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'apply_method'             => new sfValidatorChoice(array('required' => false, 'choices' => array('email' => 'email', 'url' => 'url'))),
      'apply_address'            => new sfValidatorPass(array('required' => false)),
      'culture'                  => new sfValidatorPass(array('required' => false)),
      'job_slots'                => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'credit_amount'            => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'credit_currency'          => new sfValidatorPass(array('required' => false)),
      'is_test'                  => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'is_places'                => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'smart_sort_threshold'     => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'smart_share_threshold'    => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'is_smart_sort_activated'  => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'is_smart_share_activated' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'show_ad'                  => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'show_recruiter_access'    => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'apply_iframe'             => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'top_banner_url'           => new sfValidatorPass(array('required' => false)),
      'top_banner_map'           => new sfValidatorPass(array('required' => false)),
      'bottom_banner_url'        => new sfValidatorPass(array('required' => false)),
      'bottom_banner_map'        => new sfValidatorPass(array('required' => false)),
      'job_logo_url'             => new sfValidatorPass(array('required' => false)),
      'job_logo_map'             => new sfValidatorPass(array('required' => false)),
      'custom_filters'           => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'location_filter'          => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'max_jobs_per_page'        => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'custom_tracking'          => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'xtsd'                     => new sfValidatorPass(array('required' => false)),
      'xtsite'                   => new sfValidatorPass(array('required' => false)),
      'xtn2'                     => new sfValidatorPass(array('required' => false)),
      'rt_valid'                 => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'rt_updated_at'            => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
      'fb_info_updated_at'       => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
      'fb_info_sync_error'       => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'created_at'               => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
      'updated_at'               => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
    ));

    $this->widgetSchema->setNameFormat('page_profile_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'PageProfile';
  }

  public function getFields()
  {
    return array(
      'page_id'                  => 'Number',
      'current_api_id'           => 'ForeignKey',
      'previous_api_id'          => 'ForeignKey',
      'type'                     => 'Text',
      'category'                 => 'Text',
      'name'                     => 'Text',
      'picture'                  => 'Text',
      'link'                     => 'Text',
      'likes_in_install'         => 'Number',
      'client_id'                => 'Number',
      'salesforce_id'            => 'Text',
      'billing_email'            => 'Text',
      'invoice_link'             => 'Text',
      'apply_enabled'            => 'Boolean',
      'apply_method'             => 'Enum',
      'apply_address'            => 'Text',
      'culture'                  => 'Text',
      'job_slots'                => 'Number',
      'credit_amount'            => 'Number',
      'credit_currency'          => 'Text',
      'is_test'                  => 'Boolean',
      'is_places'                => 'Boolean',
      'smart_sort_threshold'     => 'Number',
      'smart_share_threshold'    => 'Number',
      'is_smart_sort_activated'  => 'Boolean',
      'is_smart_share_activated' => 'Boolean',
      'show_ad'                  => 'Boolean',
      'show_recruiter_access'    => 'Boolean',
      'apply_iframe'             => 'Boolean',
      'top_banner_url'           => 'Text',
      'top_banner_map'           => 'Text',
      'bottom_banner_url'        => 'Text',
      'bottom_banner_map'        => 'Text',
      'job_logo_url'             => 'Text',
      'job_logo_map'             => 'Text',
      'custom_filters'           => 'Boolean',
      'location_filter'          => 'Boolean',
      'max_jobs_per_page'        => 'Number',
      'custom_tracking'          => 'Boolean',
      'xtsd'                     => 'Text',
      'xtsite'                   => 'Text',
      'xtn2'                     => 'Text',
      'rt_valid'                 => 'Boolean',
      'rt_updated_at'            => 'Date',
      'fb_info_updated_at'       => 'Date',
      'fb_info_sync_error'       => 'Boolean',
      'created_at'               => 'Date',
      'updated_at'               => 'Date',
    );
  }
}
